package com.diy.sigmund.diycommon.designpatterns.factorymethod.pizza1;

import java.util.Objects;

/**
 * @author ylm-sigmund
 * @since 2022/1/17 16:23
 */
public class NYPizzaStore extends PizzaStore {

    @Override
    protected Pizza createPizza(String type) {
        if (Objects.equals("cheese", type)) {
            return new NYStyleCheesePizza();
        } else if (Objects.equals("veggie", type)) {
            return new NYStyleViggiePizza();
        } else if (Objects.equals("clam", type)) {
            return new NYStyleClamPizza();
        } else if (Objects.equals("pepperoni", type)) {
            return new NYStylePepperoniPizza();
        } else {
            return null;
        }
    }
}
